﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.IO.Compression;

namespace HeerLauncherCoreLibrary.Tool
{
    public class ZipHelper
    {
        public static void unzip(string path,string outpath) {
            if (System.IO.File.Exists(path))
            {
                if (Directory.Exists(outpath))
                {
                    //Directory.Delete(outpath,true);
                    //Directory.CreateDirectory(outpath);
                }
                //if (System.IO.File.Exists(outpath + "\\META-INF\\MANIFEST.MF")) System.IO.File.Delete(outpath + "\\META-INF\\MANIFEST.MF");
                try
                {
                    ZipFile.ExtractToDirectory(path, outpath);
                }
                catch {
                }

            } else {
                //throw new Exception("缺少lib");
            }

        }
    }
}